package com.xs.gis.domain.geojson;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author xs-sh
 * @Classname GeoGeometry
 * @Description TODO
 * @Date 2024/9/26 14:43
 * @Created w
 */

@NoArgsConstructor
@Data
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY,property = "type")
@JsonSubTypes(value = {
        @JsonSubTypes.Type(value = GeoPoint.class, name = "Point"),
        @JsonSubTypes.Type(value = GeoPoint.class, name = "PointZ"),
        @JsonSubTypes.Type(value = GeoLineString.class, name = "LineString"),
        @JsonSubTypes.Type(value = GeoLineString.class, name = "LineStringZ"),
        @JsonSubTypes.Type(value = GeoPolygon.class, name = "Polygon"),
        @JsonSubTypes.Type(value = GeoPolygon.class, name = "PolygonZ"),
        @JsonSubTypes.Type(value = GeoMultiPoint.class, name = "MultiPoint"),
        @JsonSubTypes.Type(value = GeoMultiPoint.class, name = "MultiPointZ"),
        @JsonSubTypes.Type(value = GeoMultiLineString.class, name = "MultiLineString"),
        @JsonSubTypes.Type(value = GeoMultiLineString.class, name = "MultiLineStringZ"),
        @JsonSubTypes.Type(value = GeoMultiPolygon.class, name = "MultiPolygon"),
        @JsonSubTypes.Type(value = GeoMultiPolygon.class, name = "MultiPolygonZ"),
        @JsonSubTypes.Type(value = GeoGeometryCollection.class, name = "GeometryCollection"),
        @JsonSubTypes.Type(value = GeoGeometryCollection.class, name = "GeometryCollectionZ"),
})
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public abstract class BaseGeometry {

    private String type;
}
